package com.flowershop.service;

import com.flowershop.dao.FlowerDao;
import com.flowershop.model.Flower;
import java.util.List;

public class FlowerService {
    private FlowerDao flowerDao = new FlowerDao();
    
    public boolean addFlower(Flower flower) {
        return flowerDao.addFlower(flower);
    }
    
    public boolean updateFlower(Flower flower) {
        return flowerDao.updateFlower(flower);
    }
    
    public boolean deleteFlower(int id) {
        return flowerDao.deleteFlower(id);
    }
    
    public List<Flower> getAllFlowers() {
        return flowerDao.getAllFlowers();
    }
    
    public Flower getFlowerById(int id) {
        return flowerDao.getFlowerById(id);
    }
    
    public List<Flower> getFlowersByCategory(int categoryId) {
        return flowerDao.getFlowersByCategory(categoryId);
    }
} 